package com.frxuexi.shop.adapter

import android.graphics.Paint
import androidx.databinding.DataBindingUtil
import com.bumptech.glide.Glide
import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.viewholder.BaseViewHolder
import com.frxuexi.base.db.ShopLoveEntity
import com.frxuexi.base.entity.ShopBeanItem
import com.frxuexi.base.utils.GlideUtil
import com.frxuexi.shop.R
import com.frxuexi.shop.databinding.ItemShopBinding
import com.frxuexi.shop.databinding.ItemShoploveBinding

class ShopLoveAdapter:BaseQuickAdapter<ShopLoveEntity,BaseViewHolder>(R.layout.item_shoplove) {
    override fun onItemViewHolderCreated(viewHolder: BaseViewHolder, viewType: Int) {
        super.onItemViewHolderCreated(viewHolder, viewType)
        DataBindingUtil.bind<ItemShoploveBinding>(viewHolder.itemView)
    }
    override fun convert(helper: BaseViewHolder, item: ShopLoveEntity) {
        val binding = DataBindingUtil.getBinding<ItemShoploveBinding>(helper.itemView)!!
        binding.bean=item
//        GlideUtil.loadRoundImage(binding.shopIv,item.image)
//        binding.shopOldprice.paintFlags= Paint.STRIKE_THRU_TEXT_FLAG
    }
}